# models.py : 模型，数据库

from .exts import db



# 用户模型 所有用户信息全部存入数据库
class User(db.Model):
    __tablename__ = 'user'
    id = db.Column(db.String(50), primary_key=True)
    username = db.Column(db.String(50), nullable=False)
    email = db.Column(db.String(50), nullable=False)
    password = db.Column(db.String(50), nullable=False)
    gender = db.Column(db.Integer, nullable=False)
    weight = db.Column(db.Float, nullable=False)
    height = db.Column(db.Float, nullable=False)
    shoe_size = db.Column(db.Float, nullable=False)

    def __init__(self,id,username,email,password,gender,weight,height,shoe_size):
        self.id = id
        self.username = username
        self.email = email
        self.password = password
        self.gender = gender
        self.weight = weight
        self.height = height
        self.shoe_size = shoe_size

